﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing;
using System.Text;
using System.Threading.Tasks;
using Homework.Properties;

namespace Homework
{
    class Candy
    {
        //获得游戏对象的矩形
        public Rectangle rectangle { get; set; }        

        public Candy(Rectangle rec)
        {
            rectangle = rec;
        }
        /// <summary>
        /// 绘图函数
        /// </summary>
        /// <param name="graphics"></param>
        public void Draw(Graphics graphics)
        {
            graphics.DrawImage(Properties.Resources.button, rectangle);
        }

    }
}
